import bb.cascades 1.0
import "../help"

Page{
    
    titleBar: TitleBar {
        id: titleBar
        visibility: ChromeVisibility.Visible
        title: "Please choose a language " + "请选择语言"
    }
    
    Container {
        
        //        signal close()
        
        //        background: Color.White
        //        minHeight: 1280
        
        //        Container {
        //            
        //            layout: StackLayout {
        //                orientation: LayoutOrientation.LeftToRight
        //            }
        //            Label {
        //                text: "Please choose a language"
        //            }
        //            Label {
        //                text: "请选择语言"
        //            }
        //        }
        //        Divider {
        //        }
        Container {
            horizontalAlignment: HorizontalAlignment.Center
            topPadding: 100
            
            
            Container {
                Button {
                    text: "English"
                    
                    onClicked:{
                        backend.setLang("en");
                        lang.lang = "en" ;
                        var assetspage = assets.createObject();
                        homeNavigation.push(assetspage);
                        //                        close();
                    }
                }
            }
        }
        Container {
            horizontalAlignment: HorizontalAlignment.Center
            topPadding: 100
            
            
            Container {
                Button {
                    text: "中文"
                    
                    onClicked:{
                        backend.setLang("cn");
                        lang.lang = "cn" ;
                        var assetspage = assets.createObject();
                        homeNavigation.push(assetspage);
                        //                        close();
                    }
                }
            }
        }
        
        Container {
            topPadding: 30
            horizontalAlignment: HorizontalAlignment.Center
            Label {
                maxWidth: 600
                multiline: true
                text: "我们暂时只支持两种语言"
            }
        }
        
        Container {
            horizontalAlignment: HorizontalAlignment.Center
            
            Label {
                maxWidth: 600
                multiline: true
                text: "We temporarily support two languages at this version"
            }
        }
    }
    
    attachedObjects: [
        ComponentDefinition {                      
            id: assets                       
            source: "../help/InitialAssets.qml"
        }
    ]
}
